1. Field of the Invention
The present invention relates to a debugger and a method of supporting a debug, for supporting a debug operation for a program used in a computer.
2. Description of the Related Art
Verification of a program used in a computer is performed by a static test, a dynamic test, or the like to determine whether the program satisfies required conditions. When a bug (incorrect behavior) in the program is detected by the above test, manual correction (i.e., debug) is performed by a programmer.
When an error is detected in the test, a code for error must be specified. There are some methods of specifying a bug portion. Of these methods, a method of back tracking of the program behavior is an effective method. In order to realize this method, a detailed instruction execution history obtained during execution of the program is required. For this reason, according to a conventional technique, in order to perform the back track of the program, a complete instruction execution history is sampled/recorded during execution of a debugging program.
However, when a debugging program is a program such as a concurrent or real-time program having nondeterministic characteristics, the overhead of a recording execution is increased upon completely sampling/recording an instruction execution history. For this reason, the behavior of the program performed when the instruction execution history is sampled/recorded is largely different from that performed when the instruction execution history is not sampled/recorded, and the bug portion detected during a test may not be reproduced.
In order to solve this drawback, at present, the following method is considered. The behavior of a program is recorded during execution of the debugging program, and the program is analyzed along the behavior of the recorded program, thereby forming an instruction execution history. However, according to this method, a long time is required for analyzing the program.
Therefore, in a debugging program, such as a concurrent or real-time program having nondeterministic characteristics, a detailed instruction execution history cannot be easily recorded or analyzed.